st-entry: Set text-related CSS properties on the internal ClutterText
Call _st_set_text_from_style() when updating the entry's style, so
that CSS style properties such as text-decoration or letter-spacing
are applied over the internal ClutterText instance.
Didier Roche [Fri, 30 Mar 2018 07:44:14 +0000 (09:44 +0200)]
ui: Theme lookup should respect XDG_DATA_DIRS
Modes, extensions and other GNOME Shell assets are searched in appropriate
subdirectories of each directory in XDG_DATA_DIRS, falling back
to global.datadir.
However, this isn't the case for themes, which are currently always expected
in global.datadir, even when referenced by a mode in a different XDG_DATA_DIR.
The fix is to have the theme finding pattern follow the same logic as other
elements.
Fixes #167.
Florian Müllner [Fri, 22 Jan 2016 14:11:05 +0000 (15:11 +0100)]
remoteMenu: Support icons in app-menu
The HIG discourages the use of icons in menus except for "noun" items
(files, bookmarks, ...). While those should be rarely used in the
application menu, it still makes sense to support them in the few
cases where they are used.
workspaceThumbnail: only update _porthole if the overview is visible
Otherwise it happens that porthole is computed again after that the
overlay is hidden (triggered by a layout reallocation) and thus not
regenerated again afterwards.
Florian Müllner [Tue, 27 Feb 2018 12:20:02 +0000 (13:20 +0100)]
utils: Simplify URL regex to only support one layer of parentheses
The author of the original URL-matching regex warns[0] that the pattern may
cause certain regex engines to lock up with certain input, namely patterns
that contain parentheses. It turns out SpiderMonkey is affected, but rather
than switching to the author's improved version (that is still crazy), sim-
plify the pattern a bit by removing support for nested parentheses in URLs.
Even a single pair of parentheses is extremely rare, so this is unlikely to
make a noticeable difference (other than not locking up SpiderMonkey of
course) ...
polkitAgent: Hide authentication dialogs while locked
Since commit 78a92fb6be we no longer pop up authentication dialogs
on the lock screen, however any dialog that is already open at that
time remains open. This is unexpected, so hide the dialog until
the screen is unlocked again.
Florian Müllner [Mon, 9 Oct 2017 22:04:56 +0000 (00:04 +0200)]
workspace: Don't move focus unconditionally
Since commit 1939e22c22c, we move the keyboard focus with the hover
highlight. However while this makes sense when interacting with
the window picker, it interferes with keyboard navigation of other
components like dash or top bar. Address this by only moving the
focus when the previous focus was already inside the window picker
or unset.
Florian Müllner [Sun, 25 Mar 2018 16:39:37 +0000 (18:39 +0200)]
worldClock: Handle named timezones
The original UTC support in GWeather piggy-backed on the existing API, but
as "country" or "city" don't make sense in the context of UTC or AoE, the
concept of "named timezones" was introduced. Handle those explicitly to get
back labels for those locations.
Florian Müllner [Mon, 15 Jan 2018 14:36:44 +0000 (15:36 +0100)]
overview: Use monotonic time to check for consecutive activations
We don't toggle the overview if the request happens too close to the
last activation, to filter out double-clicks or activation by both
the hot corner and a click. However as the check is based on the
real time, the check breaks if the system clock moves backwards and
the last activations appears to be in the future. Fix this by using
monotonic time which is guaranteed to only move forward.
Florian Müllner [Fri, 23 Feb 2018 16:29:54 +0000 (17:29 +0100)]
st: Do not force allocation updates during shadow creation
If an actor is pending a relayout when get_allocation_box() is called,
the method forces an allocation update. In case of StWidget, this might
then result in a style update and a consecutive invalidation of the
shadow spec.
A helper method that invalidates one of its parameters as a side effect
(and by extension its return value as well) is most unexpected, so cur-
rently _st_create_shadow_pipeline_from_actor() poses an easy trap to
callers to run into.
Remove that trap by calling get_size()/get_position() instead, which
don't have the unintended side effect - it is still a good idea to fix
callers who were running into this to not waste resources on creating
shadows that are invalidated before the next paint, but throwing un-
defined behavior at them is harsh ...
Florian Müllner [Sun, 18 Mar 2018 21:07:32 +0000 (22:07 +0100)]
build: Run postinstall script where necessary
Package managers usually take care of compiling GSettings schemas and
updating the .desktop database on installation, but when building
manually from source, we should perform the aforementioned actions
ourselves.
polkitAgent: Queue authentication requests while locked
While polkit requests *should* be the result of a user action, that's
not always the case in practice and authentication dialogs can pop up
out of nowhere at any time. That's always annoying, but particularly
bad on the lock screen. If we disabled the polkit component altogether,
the fallback GTK-based agent would kick in, so instead handle the case
explicitly and postpone showing the dialog until the session is unlocked.
Andy Holmes [Mon, 2 Apr 2018 21:54:43 +0000 (14:54 -0700)]
system: Align submenu labels with parent - adjust for deeper hierarchies
Adjust the previous commit which applied the alignment to :first-child
descendants, instead of only immediate children. This fixes alignment
issues for a number of Shell extensions by making it easier to override
with a .popup-menu-item style-subclass.
Carlos Garnacho [Thu, 15 Mar 2018 13:01:51 +0000 (14:01 +0100)]
inputMethod: Pass all key events through the current IM method
Even though we are using an "xkb" source, it still makes sense to
pass the event through the IBus simple engine, in order to let it
handle compose keys and ctrl+shift+[u|e].
Carlos Garnacho [Tue, 27 Feb 2018 13:20:47 +0000 (14:20 +0100)]
shell-global: Do not deal with allocated strings as const char
The imagedir and userdatadir variables are not fetched from
constants/environment but created with g_strdup*/g_build*. Acknowledge that
and also free the strings in finalize.
boltd 0.2 gained a property that indicates if it is authorizing
devices or not. If it indeed is not authorizing then we wont
try to enroll new devices because that would otherwise lead to
and error.
Florian Müllner [Tue, 27 Feb 2018 22:34:09 +0000 (23:34 +0100)]
viewSelector: Don't mark synth event as in capture phase
When we move keyboard focus to the search entry, we replay the key press
that triggered the move to the entry using ClutterActor's event() method.
Since commit 3b293e91e we specify that the event is in the capture phase
to make it work with StIMText, but now that commit 83accce24 removed it,
we have to return to the expected non-capture flag that matches the orig-
inal event to unbreak find-as-you-type functionality.
Florian Müllner [Tue, 27 Feb 2018 17:52:35 +0000 (18:52 +0100)]
viewSelector: Don't duplicate find-as-you-type in captured-event
Find-as-you type was never automatically handled by StIMText, but
by the existing stage key-press handler. The functionality broke
for a different reason, we will fix it after reverting the recent
captured-event changes.
Florian Müllner [Fri, 23 Feb 2018 09:27:07 +0000 (10:27 +0100)]
messageList: Fix invisible close buttons still working
Since commit c4f2bb5f, close buttons are hidden by making them fully
transparent rather than setting their visibility to false to keep
the overall message layout stable. As a result, the buttons now work
even when invisible, which is clearly unexpected - fix this by updating
the reactive property appropriately.
Florian Müllner [Sat, 2 Dec 2017 00:27:35 +0000 (01:27 +0100)]
cleanup: Use Function.prototype.bind()
When not using arrow notation with anonymous functions, we use Lang.bind()
to bind `this` to named callbacks. However since ES5, this functionality
is already provided by Function.prototype.bind() - in fact, Lang.bind()
itself uses it when no extra arguments are specified. Just use the built-in
function directly where possible, and use arrow notation in the few places
where we pass additional arguments.
Florian Müllner [Tue, 31 Oct 2017 00:38:18 +0000 (01:38 +0100)]
cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).
Florian Müllner [Wed, 21 Feb 2018 13:03:18 +0000 (14:03 +0100)]
tests: Set calendar event source
Ever since commit e9e30138bd6 (2011!), the calendar only initialized
the header at construction time. Set an event source to trigger an
update of the content area, which is what the test is mainly intended
for.
Florian Müllner [Wed, 21 Feb 2018 12:01:56 +0000 (13:01 +0100)]
tests: Fix gnome-shell theme import
The current import rule fails in two ways:
- commit c62e7a6a moved the theme's stylesheet to the builddir
- since commit 49c4ba56, assets are addressed as resource:// URIs
Fix both issues by loading and referencing the theme resource instead
of the stylesheet itself.
Florian Müllner [Wed, 21 Feb 2018 12:09:48 +0000 (13:09 +0100)]
keyboard: Fix a warning
imports.misc.ibusManager.IBus is declared as const, so referencing it
from another module triggers a warning with recent mozjs. As of commit 083d11a0327 IBus is mandatory, so just make it a regular import to avoid
the warning.
Ray Strode [Thu, 13 Nov 2014 14:26:52 +0000 (09:26 -0500)]
loginDialog: only emit session-activated on user action
Right now we emit session-activated any time the bullet
moves in the session menu. That includes at startup when
picking an item arbitrarily, and any time GDM reports the
session was read from the user's account settings.
session-activated informs GDM about the newly selected session,
so emitting it in response to GDM reporting a session is a
bad idea.
This commit changes the code to only emit session-activated when
the user explicitly activates a session item from the gear menu.
Note, we no longer set the active session explicitly at start up.
This is a good thing since the item we were picking wasn't
necessarily correct. It does means if GDM fails to inform us
about the correct default session we'll now show no bullet instead
of a bullet on the wrong item.
Ray Strode [Tue, 18 Aug 2015 16:02:17 +0000 (12:02 -0400)]
gdm: honor timed login delay even if animations disabled
gnome-shell currently initiates an automatic login attempt if
timed login is enabled and the timed login animation completes.
Unfortunately, if animations are disabled (as is the case for
virtual machines) then the timed login animation will complete
instantly, and timed login will proceed immediately after gnome-shell
has noticed the user is idle for 5 seconds.
This commit addresses that problem by initiating timed login and the
animation from a main loop timeout, instead of using the tweener api.
Florian Müllner [Tue, 20 Feb 2018 09:24:24 +0000 (10:24 +0100)]
build: Minor cleanups
find_program() defaults to require the program in question, and as
failing to locate it is now fatal, there's no longer a need for
checking whether it was found later.